library(ggplot2) 
levels <- expand.grid(group=c("All", "White*", "Black*", "Hispanic"), treatment=c("A: Any New Job", "B: New Jobs with \n Earnings > 75% of Old Job","C: New Jobs with \n Earnings > 90% of Old Job"))
effect<-c(5.7,4.9,8.6,10.2,7.3,8.2,9.4,8.1,9.1,9.7,12.7,7.6)
se<-c(1.44,1.8,3.1,2.8,1.81,2.2,3.4,4.2,1.83,2.1,3.7,4.7)
eub2<-effect+qnorm(0.95)*se
elb2<-effect+qnorm(0.05)*se
eub<-effect+qnorm(0.975)*se
elb<-effect+qnorm(0.025)*se
eub3<-effect+qnorm(0.995)*se
elb3<-effect+qnorm(0.005)*se
# effect<-c(4.3780862,3.7054153,6.246464,8.2153811,5.625558,6.2435379,6.8225315,6.5158068,7.027222,7.4353855,9.2017917,6.1360245)
# eub<-c(5.8813197,5.5870785,10.1666515,12.4672946,7.3774553,8.4043744,11.5328081,11.832468,8.7974523,9.5759989,14.1848169,11.7759296)
# elb <-c(2.8748527,1.823752,2.3262691,3.9634675,3.8736606,4.082709,2.1122549,1.1991455,5.256984,5.2947645,4.2187737,0.4961194)
# eub2<-c(5.639626654,5.284544504,9.536300805,11.78351677,7.095793058,8.056947751,10.77542028,10.97745315,8.51283814,9.231842937,13.38357017,10.86893771)
# elb2<-c(3.116545706,2.126286056,2.956627135,4.647245327,4.155322902,4.430128009,2.869642719,2.054160387,5.5416058,5.638928103,5.020013168,1.403111291)
# eub3<-c(6.353649761,6.178320627,11.3983255,13.8030567,7.927935854,9.083325085,13.01272775,13.50271388,9.353686527,10.2486253,15.75042763,13.54773356)
# elb3<-c(2.402522599,1.232509933,1.094602439,2.627705403,3.323180106,3.403750675,0.632335249,-0.471100336,4.700757413,4.622145739,2.653155712,-1.275684563)
predicted.data <- cbind(levels, effect,elb,eub,elb2,eub2,elb3,eub3)
ggplot(data=predicted.data,aes(x=group))+geom_point(aes(y=effect),size=3)+geom_text(aes(y=effect,label=round(effect,2),hjust=1.25,size=0.5))+
  geom_errorbar(aes(ymin=elb,ymax=eub),size=.4,width=0.2,linetype=2)+
  geom_errorbar(aes(ymin=elb3,ymax=eub3),size=.6,width=0.2,linetype=3)+
  geom_errorbar(aes(ymin=elb2,ymax=eub2),size=.8,width=0.2,linetype=1)+
  
  geom_hline(yintercept=0,color="red",size=0.8)+
  facet_grid(~treatment,shrink=TRUE)+theme_bw()+
  ylab("Percent Decline in Job Search Duration from an \n Interquartile Range Increase in Job Accessibility ") +
  xlab("") +
#  removeGrid()+
  theme(legend.position="none")
  
    
#position=position_jitter(width=1)
  
  
  
